﻿using System.Collections.Generic;
using Shuba.Model;
using System;

namespace Shuba.Business
{
    public class AppParam
    {
        private Data.AppParam param;

        public AppParam()
        {
            param = new Data.AppParam();
        }
        
        public AppParamInfo Get()
        {
            return param.Get();
        }

        public DateTime GetDateDb()
        {
            return param.GetDateDb();
        }

        public List<AppParamInfo> GetList()
        {
            return param.GetList();
        }

        public List<AppParamInfo> GetListApproval(string UpdateBy)
        {
            return param.GetListApproval(UpdateBy.TrimEnd());
        }

        public AppParamInfo GetApprovalByID(byte id)
        {
            return param.GetApprovalByID(id);
        }

        public void Save(AppParamInfo info)
        {
            param.Save(info);
        }
  
        public void Approve(byte id, string DATABASE, int MINUTES)
        {
            Shuba.Data.AppParam.Approve(id, DATABASE, MINUTES);
        }

        public void Reject(byte id)
        {
            Shuba.Data.AppParam.Reject(id);
        }
    }
}
